home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / man / oldman3 / Timer.3T < prev    next >
Text File  |  1992-06-26  |  3KB  |  83 lines

  1. .TH TIMER
  2. .SH NAME
  3. Timer  A timing facility for C++
  4. .SH SYNOPSIS
  5. #include <cool/Timer.h>
  6. .SH DESCRIPTION
  7. The 
  8.  Timer 
  9. class is publicly derived from the 
  10.   
  11. class and provides an 
  12. interface to system timing.  It allows a 
  13.  
  14.  C++ 
  15. program to record the time between 
  16. a reference point (mark) and now. This class uses the system 
  17.  time(2) 
  18. interface 
  19. to provide time resolution at either millisecond or microsecond granularity, 
  20. depending upon operating system support and features. Since the time duration 
  21. is stored in a 32-bit word, the maximum time period before rollover occurs is 
  22. about 71 minutes. 
  23. .PP
  24. Due to operating system dependencies, the accuracy of all member function 
  25. results may not be as documented. For example, some operating systems do not 
  26. support timers with microsecond resolution. In those cases, the values returned 
  27. are provided to the nearest millisecond or other unit of time as appropriate. 
  28. See the Timer header file for system-specific notes.
  29. .SH Base Classes
  30.  
  31. .SH Friend Classes
  32. None
  33. .SH Constructors
  34. .TP
  35.  Timer ();
  36. Creates an instance of the 
  37.  Timer 
  38. class with the mark set to creation time.
  39. .SH Member Functions
  40. .TP
  41.  long all();
  42. Returns the number of milliseconds spent in the user process and the operating 
  43. system since the last reference point (mark).
  44. .TP
  45.  long all_usec();
  46. Returns the number of microseconds spent in the user process and the operating 
  47. system since the last reference point (mark). 
  48. .TP
  49.  void mark ();
  50. Sets the reference time to now.
  51. .TP
  52.  long real();
  53. Returns the number of milliseconds of wall clock time since the last reference 
  54. point (mark).
  55. .TP
  56.  long system();
  57. Returns the number of milliseconds spent in the operating system since the last 
  58. reference point (mark).
  59. .TP
  60.  long system_usec();
  61. Returns the number of microseconds spent in the operating system since the last 
  62. reference point (mark).
  63. .TP
  64.  long user();
  65. Returns the number of milliseconds spent in the user process since the last 
  66. reference point (mark). 
  67. .TP
  68.  long user_usec();
  69. Returns the number of microseconds spent in the user process since the last 
  70. reference point (mark). 
  71. .SH COPYRIGHT
  72.  
  73. Copyright (C) 1991 Texas Instruments Incorporated.
  74.  
  75. Permission is granted to any individual or institution to use, copy, modify,
  76. and distribute this software, provided that this complete copyright and
  77. permission notice is maintained, intact, in all copies and supporting
  78. documentation.
  79.  
  80. Texas Instruments Incorporated provides this software "as is" without
  81. express or implied warranty.
  82.  
  83.